<?php get_header('page');?>
<script type="text/javascript" src="<?php bloginfo('template_url');?>/mails/js/mycontact.js"></script>
	<style>
		.contact_error
		{
			display:none;
		}
		.contact_error_show
		{
			display:block;
			color:red;
			font-weight:bold;
			float:left;
			margin-left:5px;
		}
		.hanoi-arrival ul li
		{
			line-height:24px;
		}
		.content-box-1
		{
			margin-top:15px;	
		}
	</style>
<body>
<div id="topbg"></div>
<div id="container">
	<div id="header">
    	<?php include TEMPLATEPATH.'/controllers/banner/controller-banner.php';?>
        <?php require_once TEMPLATEPATH.'/views/menu/view-menu.php';?>
    </div>
    
    <div id="mid">
    	<div id="box-content">
            <!-- begin breadcrumb -->
            <?php require_once TEMPLATEPATH.'/views/breadcrumb/view-breadcrumb.php';?>
            <!-- end #breadcrumb -->
            <!-- Page content -->
            <?php
            the_post(); 
            $postID = get_the_ID();
            $title = get_the_title();
            $destination_from = get_post_meta($postID, $wpdb->prefix.'destination_from',true);
            $destination_to = get_post_meta($postID, $wpdb->prefix.'destination_to',true);
            $lenght = get_post_meta($postID, $wpdb->prefix.'lenght_of_stay',true);
            
            $alt = db_get_alt_attachment_id($postID, $wpdb->prefix.'thumbnail');
            if(!$alt)
            	$alt = db_vietnamese_slug($title);
            $thumbnail = db_get_post_meta($postID, $wpdb->prefix.'thumbnail');
            
            ?>
               <div id="content" class="page-tour-detail-3-2">
            	<div class="content-box-1">
                    <h1 class="label-content-box-1-top">DETAILS <?php echo db_shortDesc($title,100);?></h1>
                    <img src="<?php echo $thumbnail;?>" alt="<?php echo $alt;?>" />
                    <h2><?php echo $title;?></h2>
                    <p><strong>Destination from:</strong><?php echo ' '.$destination_from;?></p>
                    <p><strong>Destination to :	</strong><?php echo ' '.$destination_to;?></p>
                    <p><strong>Lenght of stay: </strong> <?php echo ' '.$lenght;?></p>
                    <p><strong>Info & Availability : </strong></p>
                    
                    <?php
                    the_content(); 
                    ?>
                    	
						<div class="btnbooking"><a href="<?php bloginfo('home');?>/booking?booked=tour&tourID=<?php echo $postID;?>" title="booktour: <?php echo  $title;?>"></a></div>
						<div class="clear"></div>
						<div class="div10"></div>
						<?php
						$plans = get_post_meta($postID, $wpdb->prefix.'plans',true);
						
						$arr_content = db_split_content_by_tag($plans);
						$counts = count($arr_content);
						for($i=0 ;$i<$counts;$i++)
						{
							if($arr_content[$i])
							{
								echo '<div class="hanoi-arrival">';
								echo $arr_content[$i];
								echo '</div>';
							}
						}
						//echo $plans; 
						?>
						<!-- 
						<div class="hanoi-arrival">
							<h5>Day 1: Hanoi arrival  (D)</h5>
						    <p>You are welcomed at Noi Bai airport by our guide and he will accompany you to your hotel. In the afternoon, we start the tour with Hanoi sightseeing. We will present you Vietnam daily life in the past and now with 2 hours cyclo tour around the Hoan Kiem lake, Ngoc Son temple and Old quarter streets. </p>
						</div>
						<div class="hanoi-arrival">
							<h5>Day 2: Ha Long Bay - the World heritage  (B/L/D)</h5>
						    <p>You are welcomed at Noi Bai airport by our guide and he will accompany you to your hotel. In the afternoon, we start the tour with Hanoi sightseeing. We will present you Vietnam daily life in the past and now with 2 hours cyclo tour around the Hoan Kiem lake, Ngoc Son temple and Old quarter streets. </p>
						</div>
						<div class="hanoi-arrival">
							<h6>Type of tour</h6>
						    <ul>
						    	<li>Private tour. (This is the sample tour, you may go with all details above or we can modify to fix your way of travel)</li>
						        <li>Easy tour</li>
						    </ul>
						</div>
						<div class="hanoi-arrival">
							<h6>Departure:</h6>
						    <ul>
						    	<li>Private tour. (This is the sample tour, you may go with all details above or we can modify to fix your way of travel)</li>
						        <li>Easy tour</li>
						    </ul>
						</div>
						<div class="hanoi-arrival">
							<h6>Feature of tour :</h6>
						    <ul>
						    	<li>Private tour. (This is the sample tour, you may go with all details above or we can modify to fix your way of travel)</li>
						        <li>Easy tour</li>
						    </ul>
						</div>
						 -->
						
						
						<div class="clear"></div>
						<?php
						$tourID = $postID;
						$list_price = db_select_all_data_by_tourID("tour_price",$tourID);
						if($list_price)
						{ 
						?>
						<table width="97%" cellspacing="0" cellpadding="0" align="center">
                   		<tbody><tr class="tieude">
                        	<td>Travel in party of</td>
                            <td>Standard</td>
                            <td>Superior </td>
                            <td>First Class </td>
                            <td>Deluxe </td>
                        </tr>
                        <?php                        
                        //$list_price = db_select_all_data("tour_price");
                        foreach ($list_price as $value) 
                        {
                        ?>
                        	<tr>
	                        	<td class="cot1"><?php echo $value->travelinparty;?></td>
	                            <td><?php echo $value->standard;?>  USD</td>
	                            <td><?php echo $value->superior;?>  USD</td>
	                            <td><?php echo $value->firstclass;?>  USD</td>
	                            <td class="cot5"><?php echo $value->deluxe;?> USD</td>
	                        </tr>
                        <?php 
                        }                        
                        ?>                                               
                   </tbody>
                   </table>
                   <?php
						}
                   ?>
					<div class="clear"></div>
					<div class="div10"></div>
					
					<div class="clear"></div>
					<?php
                       $inclusive = get_post_meta($postID, $wpdb->prefix.'inclusive',true);
                       if($inclusive)
                       {
                       ?>
                    	<div class="hanoi-arrival">
							<h6>Inclusive:</h6>						
	                        
							<?php
							echo $inclusive; 
							?>
							<!-- 
						    <ul>
						    	<li>Private tour. (This is the sample tour, you may go with all details above or we can modify to fix your way of travel)</li>
						        <li>Easy tour</li>
						        <li>Private car/mini van, train tickets (AC comfortable soft sleeper, sharing basic)</li>
						    </ul>
						     -->
						</div>   
                       <?php 	
                       }  
					?>
					<?php
					$exclusive = get_post_meta($postID, $wpdb->prefix.'exclusive',true);
                    if($exclusive)
                    {
                    ?>
                    <div class="hanoi-arrival">
						<h6>Exclusive:</h6>
						<?php
						echo $exclusive; 
						?>
						<!-- 
					    <ul>
					    	<li>Private tour. (This is the sample tour, you may go with all details above or we can modify to fix your way of travel)</li>
					        <li>Easy tour</li>
					        <li>Vietnam Visa - this can be done with our Visa service</li>
					    </ul>
					     -->
					</div>
                    <?php 	
                    } 
					?>
										
					<div class="clear"></div>
					<div class="div10"></div>
					<div class="lefttag"></div>
					<div class="righttag">
						<?php the_tags(' ','  ',' ');?>
					</div>
					<div class="clear"></div>
					<div class="div10"></div>
					<ul class="social">
						<?php include TEMPLATEPATH.'/views/social/social1.php';?>
					</ul>
					<div class="clear"></div>
					<?
                    $type_comment = 'hotel';
                    $type = $type_comment;
                    include TEMPLATEPATH.'/comments/view-comment-form.php'
                    ?>              
                
					<div class="div10"></div>
					<?php 
					$term = '';
		            $taxonomy	= 'category';
		            $num_post	= 9;
				    $post_type	= 'tour';						   
				    $field		= 'slug';				    
				    $metakey	= $wpdb->prefix.'display';
				    $metavalue  = 'display';	
				    	            
					$terms = get_the_terms($postID,$taxonomy);
					if($terms)
					{
						$i=1;					
						foreach ($terms as $value) 
						{
							if($i==1)
								$term = $value->slug;
						}						
						require_once TEMPLATEPATH.'/views/tour/view-similar-tours-single.php';
					}
					?>   
                </div>
                <?php include TEMPLATEPATH.'/views/testimonial/view-home-testimonial.php';?>
            </div> 
            <!-- End Page contetn -->
        </div>
        
        <?php get_sidebar();?>
    </div>
    
    
    <?php //include TEMPLATEPATH.'/views/testimonial/view-home-testimonial.php';?>
    <?php get_footer('page');?>
